package com.itheima.web;

import com.itheima.pojo.Setmeal;
import com.itheima.service.SetmealService;
import com.itheima.support.Result;
import com.itheima.support.SysConsts;
import com.itheima.utils.RedisUtil;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("setmeal")
public class SetmealController {
    @DubboReference
    private SetmealService setmealService;

    @GetMapping("/findAll")
    public Result findAll(){
        return new Result(setmealService.findAll());
    }
    @GetMapping("/findSetMealDetail/{sId}")
    public Result findSetMailDetail(@PathVariable("sId") Long sId ){
        return new Result(setmealService.findSetMailDetail(sId));
    }
}
